<extend name="Common/layout" />

<block name="content">

    <div id="content">
        <div class="page-header">
            <div class="container-fluid">
                <div class="pull-right">
                    <a href="{:U('add')}" data-toggle="tooltip" title="新增" class="btn btn-primary">
                        <i class="fa fa-plus"></i>
                    </a>

                    <button type="button" data-toggle="tooltip" title="删除" class="btn btn-danger" onclick="confirm('确认？') ? $('#form-category').submit() : false;">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </div>
                <h1>商品品牌</h1>
                <ul class="breadcrumb">
                    <li>
                        <a href="{:U('list')}">首页</a>
                    </li>
                    <li>
                        <a href="#">品牌列表</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        <i class="fa fa-list"></i>
                        商品品牌列表
                    </h3>
                </div>
                <div class="panel-body">
                    <form action="{:U('list')}" method="get">
                        <div class="well">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label class="control-label" for="input-filter_title">品牌名称</label>
                                        <input name="filter_title" value="{$filter['filter_title']}" placeholder="品牌名称" id="input-filter_title" class="form-control" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row"><!-- div.row>div.col-sm-12 -->
                                <div class="col-sm-12">
                                    <button type="submit" id="button-filter" class="btn btn-primary pull-right">
                                        <i class="fa fa-search"></i>
                                        筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                    <form action="" method="post" enctype="multipart/form-data" id="form-category">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <td style="width: 1px;" class="text-center">
                                        <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" />
                                    </td>
                                    <td class="text-left">
                                        <a href="" class="asc">品牌</a>
                                    </td>
                                    <td class="text-left">
                                        <a href="" class="desc">LOGO</a>
                                    </td>
                                    <td class="text-left">
                                        <a href="" class="desc">站点</a>
                                    </td>
                                    <td class="text-right" class="asc">
                                        <a href="">顺序</a>
                                    </td>
                                    <td class="text-right" class="asc">
                                        <a href="">添加时间</a>
                                    </td>
                                    <td class="text-right">操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="row">
                                    <tr>
                                        <td class="text-center">
                                            <input type="checkbox" name="selected[]" value="{$row['brand_id']}" />
                                        </td>
                                        <td class="text-left">
                                            {$row['title']}
                                        </td>
                                        <td class="text-left">
                                            {$row['logo']}
                                        </td>
                                        <td class="text-left">
                                            {$row['site']}
                                        </td>
                                        <td class="text-right">
                                            {$row['sort_number']}
                                        </td>
                                        <td class="text-right">
                                            {$row['created_at']|date="Y-m-d H:i:s",###}
                                        </td>
                                        <td class="text-right">
                                            <a href="{:U('edit', ['brand_id'=>$row['brand_id']])}" data-toggle="tooltip" title="编辑" class="btn btn-primary">
                                                <i class="fa fa-pencil"></i>
                                            </a>
                                        </td>
                                    </tr>
                                </volist>


                                </tbody>
                            </table>
                        </div>
                    </form>

                    <div class="row">
                        {$pageHtml}
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>